<template>
    <div id="components-dropdown-demo-placement">
      <template v-for="(placement, index) in placements">
        <a-dropdown :placement="placement">
          <a-button>{{ placementsText[index] }}</a-button>
          <a-menu slot="overlay">
            <a-menu-item>选项一</a-menu-item>
            <a-menu-item>选项二</a-menu-item>
            <a-menu-item>选项三</a-menu-item>
          </a-menu>
        </a-dropdown>
        <br v-if="index === 2" />
      </template>
    </div>
  </template>
  
  <script>
  export default {
    data() {
      return {
        placements: ['bottomCenter', 'topCenter'],
        placementsText: ['下', '上'],
      };
    },
  };
  </script>
  <style>
  #components-dropdown-demo-placement .ant-btn {
    margin-right: 8px;
    margin-bottom: 8px;
  }
  </style>
  